package com.zz.tijian.controller;

import com.zz.tijian.entity.Cireport;
import com.zz.tijian.entity.res.ReportDetailVo;
import com.zz.tijian.entity.res.ReportListVo;
import com.zz.tijian.entity.res.ReportVo;
import com.zz.tijian.entity.res.Result;
import com.zz.tijian.service.CireportService;
import io.swagger.annotations.Api;
import io.swagger.models.auth.In;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@Api(tags = "report-报告相关接口")
@RestController
@RequestMapping("/report")
@CrossOrigin
public class CheckController {

    @Autowired
    private CireportService cireportService;
    @GetMapping("/getAllReport")
    public Result<List<ReportListVo>> getAllReport(){
        return cireportService.getAllReport();
    }

    @GetMapping("/getReportDetail/{orderId}")
    public Result<ReportVo> getReportDetail(@PathVariable Integer orderId){
        return cireportService.getReportDetail(orderId);
    }


}
